package com.qpf

def list = [9, 6, 8, 1,-2, -7, 0]

println list.sort()
println list.sort {x, y -> Math.abs(x) > Math.abs(y) ? 1 : -1}

list = [9, 6, 8, 1,-2, -7, 0]
println list.find {it % 2 == 0}
println list.findAll {it % 2 != 0}
println list.any {it % 2 == 0}
println list.every {it % 2 == 0}
println list.max {it.abs()}
println list.max()
println list.min {it.abs()}
println list.min()
println list.count {it % 2 == 0}
